{% extends 'basepl.html' %}
{% load static %}
{% block head %}
    <title>考试管理</title>
    <style>
    #paper{
        background-color: ghostwhite;
        border: rgba(56, 25, 169, 0.07) solid ;
        width: 370px;
        height: 590px;
        left: 0;
        position: absolute;
    }
    #tshow {
        position: absolute;
        padding-right:10px;
        overflow-y:auto;
        padding-left:10px;
        SCROLLBAR-FACE-COLOR:#ffffff;
        font-size:11pt;
        padding-bottom:0;
        scrollbar-highlight-color:#ffffff;
        scrollbar-shadow-color:#919192;
        color:black;
        scrollbar-3dlight-color:#ffffff;
        line-height:100%;
        scrollbar-arrow-color:#919192;
        padding-top:0;
        scrollbar-track-color:#ffffff;
        font-family: 宋体;
        scrollbar-darkshadow-color:#ffffff;
        letter-spacing:1pt;

        align-items: center;
        background-color: ghostwhite;
        border: rgba(56, 25, 169, 0.07) solid ;
        width: 780px;
        height: 290px;
        left: 400px;


    }
    #testinfo{
        background-color: ghostwhite;
        border: rgba(56, 25, 169, 0.07) solid ;
        width: 800px;
        height: 300px;
        left: 400px;
        top: 290px;
        position: absolute;
    }
    </style>
{% endblock head %}

{% block nav %}
<li><a href="/teaIndex">首页</a></li>
<li><a href="#top">大学课程教学过程管理系统</a></li>
<li><a href="/">切换账号</a></li>
<li><a href="#"></a></li>
<li><a href="#">关于</a></li>
<li><a href="/">注销</a></li>
{% endblock %}
{% block li %}
<li><a href="/teaIndex/teapick">选&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;课</a></li>
<li><a href="/teaIndex/test">考&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;试</a></li>
<li><a href="/teaIndex/tcallendar">日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历</a></li>
{% endblock li %}

{% block section %}
<div id="paper">
<h4 align="center">试卷上传</h4>
    <form method = 'post' enctype="multipart/form-data" >
            {% csrf_token %}
            {{ tf.as_p }}
            <input id="tjbtn" type="submit" value = "确定" >
    </form>
    <br>
    <h3 align="center">历史上传</h3>
    <br>
    <table cellpadding="8px"  border="1px">
        <tr>
            <td width="100px" align="center">课程</td>
            <td width="200px" align="center">试卷</td>
        </tr>
    {% if testshow %}
        {% for ts in testshow %}
        <tr>
            <td align="center">{{ ts.cnm }}</td>
            <td align="center">{{ ts.paper }}</td>
        </tr>
        {% endfor %}
    {% else %}
        <tr><td align="center">无</td></tr>
    {% endif %}

    </table>
</div>
<div id="tshow">
<h5>考试信息(审核状态：0-未审核 1-未通过 2-已通过)</h5>
    <table cellpadding="2px" border="1px">
        <tr>
            <td width="100px" align="center">课程</td>
            <td width="100px" align="center">审核状态</td>
            <td width="200px" align="center">备注</td>

            <td width="160px" align="center">监考教师</td>
            <td width="180px" align="center">建议考试时间</td>
            <td width="100px" align="center">审核人1</td>
            <td width="100px" align="center">审核人2</td>
            <td width="100px" align="center">审核人3</td>
        </tr>
        {% if tn %}
            {% for t in tn %}
            <tr>
                <td align="center">{{ t.cnm_id }}</td>
                <td align="center">{{ t.flag }}</td>

                {% if t.flag == 0 %}
                    <td align="center">-</td>
                    <td align="center">-</td>
                    <td align="center">-</td>
                    <td align="center">-</td>
                    <td align="center">-</td>
                    <td align="center">-</td>
                {% else %}
                    {% if t.flag == 1 %}
                        {% if t.verifier1 != '0' %}
                            {% if t.verifier2 == '0' %}
                                <td align="center">{{ t.verify }}</td>
                                <td align="center">-</td>
                                <td align="center">-</td>
                                <td align="center">{{ t.verifier1 }}</td>
                                <td align="center">-</td>
                                <td align="center">-</td>
                            {% else %}
                                {% if t.verifier3 == '0' %}
                                    <td align="center">{{ t.verify }}</td>
                                    <td align="center">-</td>
                                    <td align="center">-</td>
                                    <td align="center">{{ t.verifier1 }}</td>
                                    <td align="center">{{ t.verifier2 }}</td>
                                    <td align="center">-</td>
                                {% else %}
                                    <td align="center">{{ t.verify }}</td>
                                    <td align="center">-</td>
                                    <td align="center">-</td>
                                    <td align="center">{{ t.verifier1 }}</td>
                                    <td align="center">{{ t.verifier2 }}</td>
                                    <td align="center">{{ t.verifier3 }}</td>
                                {% endif %}
                            {% endif %}

                        {% endif %}
                    {% else %}
                        <td align="center">-</td>
                        <td align="center">{{ t.proctor }}</td>
                        <td align="center">{{ t.starttime }}-{{ t.endtime }}</td>
                        <td align="center">{{ t.verifier1 }}</td>
                        <td align="center">{{ t.verifier2 }}</td>
                        <td align="center">{{ t.verifier3 }}</td>
                    {% endif %}
                {% endif %}
            </tr>
            {% endfor %}
        {% else %}
            <tr><td>暂未查询到更新信息</td></tr>
        {% endif %}
    </table>
</div>
<div id="testinfo">
<h5>布置考试</h5>
    <form method = 'post' enctype="multipart/form-data">
        {% csrf_token %}
        <label>考试科目:</label><input type="text" name="examname" required>
        <label>考试时间:</label><input type="text" name="examtime" required><br><br>
        <label>考试地点:</label><textarea name="exampos" id="" cols="42" rows="2" required></textarea><br><br>
        <label>考试说明:</label><textarea name="examtip" id="" cols="42" rows="2"></textarea>
        <input type="submit" value="提交">
    </form>
</div>

{% endblock section %}

{% block qd %}

{% endblock qd %}